Distance based search ranking demotion

ABSTRACT

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for processing local search results. In one aspect, a method determines a first local document in a set of local documents for search results is eligible for a demotion operation. The determination is based at least in part on a proximity measure based on the location of the user device and a location specified for the first local document. In response to the determination, for each other local documents in the set of local documents, a proximity measure location of the user device and the location specified for the other local document is determined. The first local document is demoted in its ranking when at least one of the proximity measures indicates a respective other local document has a specified location that is within a threshold distance of the location of the user device.

BACKGROUND

This specification relates to processing local search results. TheInternet provides access to a wide variety of resources such as video oraudio files, web pages for particular subjects, book articles, or newsarticles. A search system can identify resources in response to a searchquery that includes one or more search phrases (i.e., one or morewords). The search system ranks the resources based on their relevanceto the search query and on measures of quality of the resources andprovides search results that link to the identified resources. Thesearch results are typically ordered for viewing according to the rank.

Some search systems can obtain or infer a location of a user device fromwhich a search query was received and include local search results thatare responsive to the search query. A local search result is a searchresult that references a local document. A local document, in turn, is adocument that has been classified as having local significance toparticular locations of user devices. Accordingly, a local document mayreceive a search score “boost” for a query if the location associatedwith the local document is near the location of the user device. Forexample, in response to a search query for “coffee shop,” the searchsystem may provide local search results that reference web pages forcoffee shops near the location of the user device. Many users in variousgeographic regions will likely be satisfied with receiving local resultsfor coffee shops in response to the search query “coffee shop” becauseit is likely that a user submitting the query “coffee shop” isinterested in search results for coffee shops that are local to theuser's location.

Some local results, however, may have very high scores independent ofthe local scoring boost. This score, which is referred to as a “locationindependent score,” may be high due to the document being of interest topeople outside of a region that includes the location of the localresult. For example, a restaurant may have a very unique name, and mayalso be a famous restaurant nationwide. Accordingly, although therestaurant has local significant, it may still be of very great interestto users nationwide. Thus, a search algorithm that takes into accountsearch traffic and query log data may rank a document for the restaurant(e.g., a web page) very high.

By way of another example, a power company named after Thomas Edison mayhave very heavy local traffic in a large state. Thus, the searchalgorithm that takes into account search traffic and query log data willalso rank a document for the power company very high due to the sheervolume or traffic to the webpage by its many customers. However, thepower company webpage may be of very little interest to a user severalstates away. For example, a user may desire to learn about ThomasEdison, and not the power company that bears his name. However, due tothe large volume of traffic to the power company web page, that web pagemay be ranked higher than a webpage about the man, the latter of whichis more likely to be of interest to a user that inputs the query“Edison.”

SUMMARY

In general, one innovative aspect of the subject matter described inthis specification can be embodied in methods that include the actionsof receiving data specifying a search query, and a location of a userdevice from which the search query was received; receiving dataspecifying a set of documents determined to be relevant to the searchquery, the data specifying, for each of the documents, a respectivesearch score indicative of the relevance of the document to the queryand a ranking of the documents according to a first order based on thesearch scores, and wherein a proper subset of the documents are localdocuments, wherein each of the local documents is a document that isspecified as having local significance to a geographic location of auser device; determining that a first local document in the propersubset of the local documents is eligible for a demotion operation thatadjusts its respective search score to demote the rank of the firstlocal document in the first order, the determination based at least inpart on a proximity measure based on the geographic location of the userdevice and a geographic location specified for the first local document,and in response to the determination: for each second local document inthe proper subset of local documents, determining a proximity measurethat is based on the geographic location of the user device and thegeographic location specified for the second local document; andadjusting the search score of the first local document to demote itsranking the first order when at least one of the proximity measuresindicates a respective second local document has a specified geographiclocation that is within a threshold distance of the geographic locationof the user device. Other embodiments of this aspect includecorresponding systems, apparatus, and computer programs, configured toperform the actions of the methods, encoded on computer storage devices.

These and other embodiments can each optionally include one or more ofthe following features. The method can further include, in response todetermining that a first local document in the proper subset of thelocal documents is eligible for a demotion operation, determining thatat least one document in the set of documents that is not a localdocument has a search score that meets a distant document demotionthreshold and in response adjusting the search score of the first localdocument to demote its ranking in the first order so that the rank ofthe first local document relative to the rank of the at least onedocument is decreased.

Adjusting the search score of the first local document to demote itsranking in the first order so that the rank of the first local documentrelative to the rank of the at least one document is decreased caninclude adjusting the search score of the first local document to demoteits ranking in the first order so that the rank of the at least onedocument is greater than the rank of the first local document.

The determination based at least in part on the proximity measure basedon the geographic location of the user device and a geographic locationspecified for the first local document can include determining that theproximity measure indicates a distance between the geographic locationof the user device and a geographic location specified for the firstlocal document exceeds a maximum distance.

The determination is based at least in part on the proximity measurebased on the geographic location of the user device and a geographiclocation specified for the first local document can include determiningthat the proximity measure indicates the geographic location of the userdevice and the geographic location specified for the first localdocument are not within a same region defined by a political boundary.

The search query can be a search query that does not include a locationphrase that explicitly specifies a geographic location, and the dataspecifying a search query can include a local intent measure that is ameasure of local intent for the search query.

The determining that a first local document in the proper subset of thelocal documents is eligible for a demotion operation can further includedetermining that the first local document is eligible for demotionbased, in part, on local intent measure meeting a threshold value.

The data specifying a search query can include a local intent measurethat is a measure of local intent for the search query, and adjustingthe search score of the first local document to demote its ranking inthe first order so that the rank of the first local document relative tothe rank of the at least one document is decreased can include adjustingthe search score of the first local document in inverse proportion tothe local intent measure of the search query.

Determining that a first local document in the proper subset of thelocal documents is eligible for a demotion operation can further includedetermining that the first local document is eligible for demotion onlyif the first local document has a location independent search scorecomponent that does not meet distant document preservation threshold.

Particular embodiments of the subject matter described in thisspecification can be implemented so as to realize one or more of thefollowing advantages. A data processing apparatus can provide morerelevant search results in response to receipt of a single generalsearch query with an implicit local intent by demoting local searchresults when the general search query is determined to be a locallysignificant search query for a particular user location, and thedistance of the particular user location from the location associatedwith the local search result meets a distance requirement. However,local results for distant locations are not demoted if the local resulthas relatively high location independent search score, and thusotherwise information rich documents are not inadvertently demoted.Additionally, a local result for a distant location may not be demotedif there are no nearby local results, or if there are no other resultshaving a relatively high location independent search score. Thus, alocal document for a distant location will not be demoted if theremaining documents appear to be of less relevance.

The details of one or more embodiments of the subject matter describedin this specification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example environment in which a searchsystem provides local search results.

FIG. 2 is a flow chart of an example process for demoting a local searchresult having a distant location.

FIG. 3 is a graph illustrating a sigmoid for a demotion component basedon a local intent measure of a query.

FIG. 4 is a flow chart of an example process for determining if a localsearch result is a local search result that is eligible for demotion.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

Search results in a set of search result documents are processed todetermine which, if any, of the search result documents are local searchresult documents. If a local search result document is identified, andit is further identified to be a “distant” search result document, thenit is eligible for demotion. A local search result document is a“distant” search result document when the location associated with thelocal search result document is determined to not meet a proximitythreshold. A proximity threshold may be met, for example, when thelocation for the local search result document and the location for theuser device are within a same geographic region (e.g., a same state), orwithin a threshold distance (e.g., 100 miles).

A demotion of a local search result document occurs when the searchquery has a local intent, and there is one of: a) another local searchresult document having a location that is within a threshold distance ofthe location of the user device; or b) a search result document that isnot a local search result document and having a sufficiently high searchscore. Finally, a distant search result document may be precluded frombeing demoted if a location-independent component of its search scoremeets a preservation threshold. In this latter case, the distant searchresult document may be of sufficient relevance to the query, independentof location, such that demotion would be detrimental to satisfying theuser's informational need.

These features and additional features are described in more detailbelow.

FIG. 1 is a block diagram of an example environment 100 in which asearch system 110 provides local search results. The example environment100 includes a network 102, such as the Internet, and connects publisherweb sties 104, user devices 106, and the search system 110. Each website104 is a collection of one or more resources 105 associated with adomain name and hosted by one or more servers. An example website is acollection of web pages formatted in hypertext markup language (HTML)that can contain text, images, multimedia content, and programmingelements, e.g., scripts. Each website 104 is maintained by a publisher,e.g., an entity that manages and/or owns the website.

A resource 105 is any data that can be provided by the website 104 overthe network 102 and that is associated with a resource address.Resources 105 include HTML pages, word processing documents, andportable document format (PDF) documents, images, video, and feedsources, to name just a few. The resources can include content, e.g.,words, phrases, images and sounds and may include embedded information(e.g., meta information and hyperlinks) and/or embedded instructions(e.g., scripts). A user device 106 is an electronic device that is undercontrol of a user and is capable of requesting and receiving resourcesover the network 102. Example user devices 106 include personalcomputers, mobile communication devices, and other devices that can sendand receive data over the network 102. A user device 106 typicallyincludes a user application, e.g., a web browser, to facilitate thesending and receiving of data over the network 102.

To facilitate searching of resources 105, the search system 110identifies the resources 105 by crawling and indexing the resources 105.Data describing the resources 105 can be indexed and stored in a webindex 112.

The user devices 106 submit search queries to the search system 110. Inresponse, the search system 110 accesses the index 112 to identifyresources 105 that are determined to be relevant to the search query.The search system 110 identifies the resources in the form of searchresults and returns the search results to the user devices 106 in searchresults page resource. A search result is data generated by the searchsystem 110 that identifies a resource (generally referred to as a“document”) or provides information that satisfies a particular searchquery. A search result for a document can include a web page title, asnippet of text extracted from the web page, and a resource locator forthe resource, e.g., the URL of a web page. As used in this document, a“search result” is the listing provided in a search results web page,and a “search result document,” or simply “document” is the resourcelinked to by the search result.

The search results are ranked based on scores related to the resourcesidentified by the search results, such as information retrieval (“IR”)scores, and optionally a separate ranking of each resource relative toother resources (e.g., an authority score). The search results areordered according to these scores and provided to the user deviceaccording to the order.

The user devices 106 receive the search results pages and render thepages for presentation to users. In response to the user selecting asearch result at a user device 106, the user device 106 requests theresource identified by the resource locator included in the selectedsearch result. The publisher of the website 104 hosting the resourcereceives the request for the resource from the user device 106 andprovides the resource to the requesting user device 106.

In some implementations, the queries submitted from user devices 106 arestored in query logs 114. Other information can also be stored in thequery logs, such as selection data for the queries and the web pagesreferenced by the search results and selected by users. The query logs114 can thus be used to map queries submitted by user devices toresources that were identified in search results and the actions takenby users when presented with the search results in response to thequeries.

Although many users may be satisfied with the search results that aregenerated and presented as described above, the search system 110 canuse additional information and utilize additional subsystems to improvethe quality of search results for particular users. One example ofutilizing additional information is local search result processing. Alocal result subsystem 120 can identify local documents for a searchquery. A local document is a document that is specified as having localsignificance to a geographic location. A variety of appropriate systemsmay be used to determine local documents. For example, the local resultsubsystem 120 may determine a document is a local document if thedocument includes an address; or if search results for the document havea high rate of selection from user devices in a given location relativeto user devices outside of the particular location; or if the localdocument has been specified by the publisher as being local to aparticular location; etc. For queries that have a local intent, thelocal result subsystem 120 may indicate that certain documents that aredetermined to be responsive to the query are eligible for promotion. Thefeature of a document being a local document for certain queries may bestored in the web index 112.

A query may specify a local intent explicitly or implicitly. An explicitspecification of local intent occurs when a query includes a locationphrase and/or another geographic identifier. A location phrase is one ormore terms that specify a geographic location (e.g., a zip code, anaddress, a city or a state). For example, the search query “Coffee shopsMountain View” includes the location phrase “Mountain View,” such thatthe search query “Coffee shops Mountain View” is a local query. For suchqueries, search result documents that are local to the locationspecified by the location phrase may be determined to be more relevantthan search result documents that are not local to the location. Inparticular, the location of the user device may be determined to be oflittle, if any, relevance, as the user has explicitly specified alocation.

An implicit specification of locality, however, occurs when userresponses to the query indicate a local interest. For example, for thequery “coffee shops,” observed user behavior may indicate that searchresults referencing documents having locations in close proximity to thelocation of the user device may be selected more often than searchresults referencing documents having locations that are more distant.Thus, such search queries may be determined to have an implicit localinterest with respect to a user's current location. User selectionbehavior is one example way by which queries can be determined to havean implicit local intent; however, other processes can also be used. Thefeature of a query having an implicit local intent may be stored in thequery logs 114.

When the search system 110 processes a query and identifies documentsresponsive to the query, the local result subsystem 120, in someimplementations, determines if the query has an implicit local intent.If the query does not have an implicit local intent and is not anexplicitly local query, e.g., such as the query “quadratic equation,”then the ranking of search result document is not adjusted based onlocality. However, if the query does have an implicit local intent, andis not an explicitly local query, e.g., such as the query “coffeeshops,” then the local result subsystem 120 performs a distanceadjustment process 122. The local intent of the query can, in someimplementations, be pre-determined, e.g., by another sub-system, andstored in the query logs. A variety of processes can be used todetermine local intent of a query, such as the process that observesuser behavior as described above.

The distance adjustment process 122, in some implementations, adjuststhe search scores of a local document depending on whether the localdocument is a “distant” document. When a local search result document isdetermined to be a distant document, it is eligible for demotion.Whether it is actually demoted depends, in some implementations, on thestatus of other documents in the set of documents responsive to thequery, and on the search scores of those documents and the search scoreof the distant document. One example implementation of demoting distantsearch results based on these factors is described with reference toFIG. 2, which is a flow chart of an example process 200 for demoting adistant search result. The process 200 can be used in a data processingapparatus used to implement the local result subsystem 120.

The process 200 receives data specifying a search query and a locationof a user device from which the search query was received (202). Thelocation may be, for example, geographic coordinates (or approximationsthereof) of the user device. Furthermore, in some implementations, theprocess 200 is operative only when the search query does not include alocation phrase that explicitly specifies a geographic location, and thedata specifying a search query includes a local intent measure thatmeets a threshold value. For example, the process 200 may require thatthe local intent measure of the query indicate with at least an N %likelihood that that query has local intent.

The process 200 receives data specifying a set of documents determinedto be relevant to a search query received from a user device, thedocuments ranked according to a first order (204). The data specifies,for each of the documents, a respective search score indicative of therelevance of the document to the query and a ranking of the documentsaccording to a first order based on the search scores.

Assume that a proper subset of the documents is local documents. Theprocess 200 determines if a local document is eligible for demotion(206). An example process for determining whether a local document iseligible for demotion is described with reference to FIG. 4 below.

If the local document is not eligible for demotion, then the process 200does not demote the local document (208). If, however, the localdocument is eligible for demotion, the local document is notautomatically demoted; one or more subsequent conditions may be requiredto be met before the local document is demoted. For example, in someimplementations, the local document is only demoted if there are otherlocal documents having a location near the user device, or if otherdocuments in the set of responsive documents, which are not localdocuments, have a sufficiently high search score.

The process 200 determines if there are other local documents having alocation within a threshold distance of the location of the user device(210). For example, the process 200, for each other local document inthe proper subset, determines a proximity measure that is based on thegeographic location of the user device and the geographic locationspecified for the second local document. The proximity measure canindicate a distance, and if the indicated distance is less than athreshold distance, then the local document eligible for demotion willbe demoted (214).

If, however, there are no other local documents having a location withina threshold distance of the location of the user device, then theprocess 200 determines if there is a non-local document that issufficiently ranked in the set of documents (212). For example, theprocess 200 may determine whether at least one document in the set ofdocuments that is not a local document and has a search score that meetsa distant document demotion threshold. The distant document demotionthreshold search score is a score that indicates a document is veryrelevant to the query. Because of the high relevance, the non-localdocument should not be displayed by the distant document.

If there is a non-local document that is sufficiently ranked in the setof documents, then the process 200 demotes the local document eligiblefor demotion. The process 200 adjusts the search score of the localdocument eligible for demotion to demote its ranking in the first orderso that the rank of the demoted local document relative to the rank ofthe sufficiently ranked non-local document is decreased. In someimplementations, the demotion can be such that the demoted localdocument is ranked at least one position below sufficiently rankednon-local document.

If there is not a non-local document that is sufficiently ranked, thenthe process 200 does not demote the local document eligible for demotion(208).

A demotion of a local document can be effected in a variety ofappropriate ways. In some implementations, the demotion may be a fixedamount, such as a fixed percentage of a search score, or a fixed numberof rank positions. Alternatively, the demotion may be dependent on oneor more other factors. For example, a distant document may be demoted inproportion to the measure of local intent of a query. One suchimplementation of a demotion component based on local intent is shown inFIG. 3, which is a graph 300 illustrating a sigmoid for a demotioncomponent based on a local intent measure of a query.

The graph 300 illustrates the scaling of a demotion component in theform of a sigmoid. The demotion component is used and the scaling isused to adjust the search score of a search document according to thefollowing formula:

SS _(demoted) =SS*DC*DCS   (1)

where

SS is the search score of the local document eligible for demotion;

DC is the demotion component, which is a value less than 1.0; and

DCS is the demotion scaling component of FIG. 3.

Formula (1) is one example formula, and other search score adjustmentformulas can also be used. According to the graph of FIG. 3, for a veryweak locality intent, there will be little or no demotion. However, asthe local intent signal emerges, the demotion will increase rapidly.This results in an adjustment of the search score of the eligible localdocument in inverse proportion to the local intent measure of the searchquery.

Other functions beside a sigmoid can also be used to map the localityintent to a demotion component scaling factor. Furthermore, the functionneed not be symmetrical about the locality intent range; the functioncan, for example, be shifted upward or downward on the horizontal axis.

In some implementations, the local intent of the search query may alsobe considered when determining whether a local document is eligible fora demotion operation. For example, a threshold local intent may berequired before a document may be demoted. For queries with a localintent less than the threshold local intent, no demotions will occur;conversely, for queries with a local intent greater than or equal to thethreshold local intent, a demotion of a local document may occur.

As described above, only local documents that are eligible for ademotion operation may be demoted. Selection of local documents eligiblefor demotion is described with reference to FIG. 4, which is a flowchart of an example process 400 for determining if a local search resultis a distant search result that is eligible for demotion. The process400 can be used in a data processing apparatus used to implement thelocal result subsystem 120.

The process 400 determines a proximity measure based on the geographiclocation of the user device and a geographic location specified for alocal document (402). The proximity measure can be, for example, eitherdistance based or region based. For distanced based measures, theproximity measure is a measure of the distance between the geographiclocation of the user device and a geographic location specified for thefirst local document.

The process 400 determines if the proximity measure indicates the localdocument is distant (404). If the distance exceeds a maximum localitydistance, then the local document may be eligible for demotion (410).Otherwise, the process 400 determines the local document is not eligiblefor a demotion (406).

The maximum locality distance may be the same for all local documents,or may be dependent on the local document type. For example, a maximumlocality distance for local document belonging to the category ofrestaurants may be less than the maximum location distance for localdocuments belonging to the category of medical clinics.

In some implementations, the local document is eligible for demotionwhen the proximity measure indicates a distance that exceeds the maximumlocality distance. In other implementations, however, the search scoreof the local document may preclude demotion. For example, if theproximity measure indicates a distant document, then the process 400determines if the search score of the local document meets apreservation threshold (408).

The comparison of the search score to the preservation threshold may, insome implementations, be based on a location independent search scorecomponent of the local document. For example, the final ranking of thelocal document may be the result of a search score that has beenmodified based on the document's location. This modification is ignored,and the underlying relevance score that measures the relevance of thedocument to query, without consideration of locality, is used as thesearch score that is compared to the preservation threshold.

If the search score of the local document meets the preservationthreshold, then the local document is not eligible for demotion (406).Otherwise, the process determines the local document is eligible fordemotion (410).

Embodiments of the subject matter and the operations described in thisspecification can be implemented in digital electronic circuitry, or incomputer software, firmware, or hardware, including the structuresdisclosed in this specification and their structural equivalents, or incombinations of one or more of them. Embodiments of the subject matterdescribed in this specification can be implemented as one or morecomputer programs, i.e., one or more modules of computer programinstructions, encoded on computer storage medium for execution by, or tocontrol the operation of, data processing apparatus.

Alternatively or in addition, the program instructions can be encoded onan artificially-generated propagated signal, e.g., a machine-generatedelectrical, optical, or electromagnetic signal, that is generated toencode information for transmission to suitable receiver apparatus forexecution by a data processing apparatus. A computer storage medium canbe, or be included in, a computer-readable storage device, acomputer-readable storage substrate, a random or serial access memoryarray or device, or a combination of one or more of them. Moreover,while a computer storage medium is not a propagated signal, a computerstorage medium can be a source or destination of computer programinstructions encoded in an artificially-generated propagated signal. Thecomputer storage medium can also be, or be included in, one or moreseparate physical components or media (e.g., multiple CDs, disks, orother storage devices).

The operations described in this specification can be implemented asoperations performed by a data processing apparatus on data stored onone or more computer-readable storage devices or received from othersources. The term “data processing apparatus” encompasses all kinds ofapparatus, devices, and machines for processing data, including by wayof example a programmable processor, a computer, a system on a chip, ormultiple ones, or combinations, of the foregoing The apparatus caninclude special purpose logic circuitry, e.g., an FPGA (fieldprogrammable gate array) or an ASIC (application-specific integratedcircuit). The apparatus can also include, in addition to hardware, codethat creates an execution environment for the computer program inquestion, e.g., code that constitutes processor firmware, a protocolstack, a database management system, an operating system, across-platform runtime environment, a virtual machine, or a combinationof one or more of them. The apparatus and execution environment canrealize various different computing model infrastructures, such as webservices, distributed computing and grid computing infrastructures.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, declarative orprocedural languages, and it can be deployed in any form, including as astand-alone program or as a module, component, subroutine, object, orother unit suitable for use in a computing environment. A computerprogram may, but need not, correspond to a file in a file system. Aprogram can be stored in a portion of a file that holds other programsor data (e.g., one or more scripts stored in a markup languagedocument), in a single file dedicated to the program in question, or inmultiple coordinated files (e.g., files that store one or more modules,sub-programs, or portions of code). A computer program can be deployedto be executed on one computer or on multiple computers that are locatedat one site or distributed across multiple sites and interconnected by acommunication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform actions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application-specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read-only memory ora random access memory or both. The essential elements of a computer area processor for performing actions in accordance with instructions andone or more memory devices for storing instructions and data. Generally,a computer will also include, or be operatively coupled to receive datafrom or transfer data to, or both, one or more mass storage devices forstoring data, e.g., magnetic, magneto-optical disks, or optical disks.However, a computer need not have such devices. Moreover, a computer canbe embedded in another device, e.g., a mobile telephone, a personaldigital assistant (PDA), a mobile audio or video player, a game console,a Global Positioning System (GPS) receiver, or a portable storage device(e.g., a universal serial bus (USB) flash drive), to name just a few.Devices suitable for storing computer program instructions and datainclude all forms of non-volatile memory, media and memory devices,including by way of example semiconductor memory devices, e.g., EPROM,EEPROM, and flash memory devices; magnetic disks, e.g., internal harddisks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROMdisks. The processor and the memory can be supplemented by, orincorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech, ortactile input. In addition, a computer can interact with a user bysending documents to and receiving documents from a device that is usedby the user; for example, by sending web pages to a web browser on auser's client device in response to requests received from the webbrowser.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back-end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front-end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back-end, middleware, or front-end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), an inter-network (e.g., the Internet), andpeer-to-peer networks (e.g., ad hoc peer-to-peer networks).

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other. In someembodiments, a server transmits data (e.g., an HTML page) to a clientdevice (e.g., for purposes of displaying data to and receiving userinput from a user interacting with the client device). Data generated atthe client device (e.g., a result of the user interaction) can bereceived from the client device at the server.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinventions or of what may be claimed, but rather as descriptions offeatures specific to particular embodiments of particular inventions.Certain features that are described in this specification in the contextof separate embodiments can also be implemented in combination in asingle embodiment. Conversely, various features that are described inthe context of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems cangenerally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular embodiments of the subject matter have been described.Other embodiments are within the scope of the following claims. In somecases, the actions recited in the claims can be performed in a differentorder and still achieve desirable results. In addition, the processesdepicted in the accompanying figures do not necessarily require theparticular order shown, or sequential order, to achieve desirableresults. In certain implementations, multitasking and parallelprocessing may be advantageous.

What is claimed is:
 1. A method performed by data processing apparatus,the method comprising: receiving data specifying a search query, and alocation of a user device from which the search query was received;receiving data specifying a set of documents determined to be relevantto the search query, the data specifying, for each of the documents, arespective search score indicative of the relevance of the document tothe query and a ranking of the documents according to a first orderbased on the search scores, and wherein a proper subset of the documentsare local documents, wherein each of the local documents is a documentthat is specified as having local significance to a geographic locationof a user device; determining that a first local document in the propersubset of the local documents is eligible for a demotion operation thatadjusts its respective search score to demote the rank of the firstlocal document in the first order, the determination based at least inpart on a proximity measure based on the geographic location of the userdevice and a geographic location specified for the first local document,and in response to the determination: for each second local document inthe proper subset of local documents, determining a proximity measurethat is based on the geographic location of the user device and thegeographic location specified for the second local document; andadjusting the search score of the first local document to demote itsranking the first order when at least one of the proximity measuresindicates a respective second local document has a specified geographiclocation that is within a threshold distance of the geographic locationof the user device.
 2. The method of claim 1, further comprising, inresponse to determining that a first local document in the proper subsetof the local documents is eligible for a demotion operation: determiningthat at least one document in the set of documents that is not a localdocument has a search score that meets a distant document demotionthreshold and in response adjusting the search score of the first localdocument to demote its ranking in the first order so that the rank ofthe first local document relative to the rank of the at least onedocument is decreased.
 3. The method of claim 1, where adjusting thesearch score of the first local document to demote its ranking in thefirst order so that the rank of the first local document relative to therank of the at least one document is decreased comprises adjusting thesearch score of the first local document to demote its ranking in thefirst order so that the rank of the at least one document is greaterthan the rank of the first local document.
 4. The method of claim 1,wherein the determination based at least in part on the proximitymeasure based on the geographic location of the user device and ageographic location specified for the first local document comprisesdetermining that the proximity measure indicates a distance between thegeographic location of the user device and a geographic locationspecified for the first local document exceeds a maximum distance. 5.The method of claim 1, wherein the determination based at least in parton the proximity measure based on the geographic location of the userdevice and a geographic location specified for the first local documentcomprises determining that the proximity measure indicates thegeographic location of the user device and the geographic locationspecified for the first local document are not within a same regiondefined by a political boundary.
 6. The method of claim 1, wherein thesearch query does not include a location phrase that explicitlyspecifies a geographic location, and the data specifying a search queryincludes a local intent measure that is a measure of local intent forthe search query, and determining that a first local document in theproper subset of the local documents is eligible for a demotionoperation further comprises determining that the first local document iseligible for demotion based, in part, on local intent measure meeting athreshold value.
 7. The method of claim 1, wherein the data specifying asearch query includes a local intent measure that is a measure of localintent for the search query, and adjusting the search score of the firstlocal document to demote its ranking in the first order so that the rankof the first local document relative to the rank of the at least onedocument is decreased comprises adjusting the search score of the firstlocal document in inverse proportion to the local intent measure of thesearch query.
 8. The method of claim 1, wherein determining that a firstlocal document in the proper subset of the local documents is eligiblefor a demotion operation further comprises determining that the firstlocal document is eligible for demotion only if the first local documenthas a location independent search score component that does not meetdistant document preservation threshold.
 9. A system, comprising: a dataprocessing apparatus; and a data store storing instructions executableby the data processing apparatus and that upon such execution cause thedata processing apparatus to perform operations comprising: receivingdata specifying a search query, and a location of a user device fromwhich the search query was received; receiving data specifying a set ofdocuments determined to be relevant to the search query, the dataspecifying, for each of the documents, a respective search scoreindicative of the relevance of the document to the query and a rankingof the documents according to a first order based on the search scores,and wherein a proper subset of the documents are local documents,wherein each of the local documents is a document that is specified ashaving local significance to a geographic location of a user device;determining that a first local document in the proper subset of thelocal documents is eligible for a demotion operation that adjusts itsrespective search score to demote the rank of the first local documentin the first order, the determination based at least in part on aproximity measure based on the geographic location of the user deviceand a geographic location specified for the first local document, and inresponse to the determination: for each second local document in theproper subset of local documents, determining a proximity measure thatis based on the geographic location of the user device and thegeographic location specified for the second local document; andadjusting the search score of the first local document to demote itsranking the first order when at least one of the proximity measuresindicates a respective second local document has a specified geographiclocation that is within a threshold distance of the geographic locationof the user device.
 10. The system of claim 9, wherein the instructionscause the data processing apparatus to perform operations furthercomprising, in response to determining that a first local document inthe proper subset of the local documents is eligible for a demotionoperation: determining that at least one document in the set ofdocuments that is not a local document has a search score that meets adistant document demotion threshold and in response adjusting the searchscore of the first local document to demote its ranking in the firstorder so that the rank of the first local document relative to the rankof the at least one document is decreased.
 11. The system of claim 9,wherein the operation of adjusting the search score of the first localdocument to demote its ranking in the first order so that the rank ofthe first local document relative to the rank of the at least onedocument is decreased comprises the operation of adjusting the searchscore of the first local document to demote its ranking in the firstorder so that the rank of the at least one document is greater than therank of the first local document.
 12. The system of claim 9, wherein theoperation of determining that a first local document in the propersubset of the local documents is eligible for a demotion operation thatadjusts its respective search score to demote the rank of the firstlocal document in the first order comprises the operation of determiningthat the proximity measure indicates a distance between the geographiclocation of the user device and a geographic location specified for thefirst local document exceeds a maximum distance.
 13. The system of claim9, wherein the operation of determining that a first local document inthe proper subset of the local documents is eligible for a demotionoperation that adjusts its respective search score to demote the rank ofthe first local document in the first order comprises the operation ofdetermining that the proximity measure indicates the geographic locationof the user device and the geographic location specified for the firstlocal document are not within a same region defined by a politicalboundary.
 14. The system of claim 9, wherein the search query does notinclude a location phrase that explicitly specifies a geographiclocation, and the data specifying a search query includes a local intentmeasure that is a measure of local intent for the search query, and theoperation of determining that a first local document in the propersubset of the local documents is eligible for a demotion operationfurther comprises the operation of determining that the first localdocument is eligible for demotion based, in part, on local intentmeasure meeting a threshold value.
 15. A data store storing instructionsexecutable by a data processing apparatus and that upon such executioncause the data processing apparatus to perform operations comprising:receiving data specifying a search query, and a location of a userdevice from which the search query was received; receiving dataspecifying a set of documents determined to be relevant to the searchquery, the data specifying, for each of the documents, a respectivesearch score indicative of the relevance of the document to the queryand a ranking of the documents according to a first order based on thesearch scores, and wherein a proper subset of the documents are localdocuments, wherein each of the local documents is a document that isspecified as having local significance to a geographic location of auser device; determining that a first local document in the propersubset of the local documents is eligible for a demotion operation thatadjusts its respective search score to demote the rank of the firstlocal document in the first order, the determination based at least inpart on a proximity measure based on the geographic location of the userdevice and a geographic location specified for the first local document,and in response to the determination: for each second local document inthe proper subset of local documents, determining a proximity measurethat is based on the geographic location of the user device and thegeographic location specified for the second local document; andadjusting the search score of the first local document to demote itsranking the first order when at least one of the proximity measuresindicates a respective second local document has a specified geographiclocation that is within a threshold distance of the geographic locationof the user device.
 16. The data store of claim 15, wherein theinstructions cause the data processing apparatus to perform operationsfurther comprising, in response to determining that a first localdocument in the proper subset of the local documents is eligible for ademotion operation: determining that at least one document in the set ofdocuments that is not a local document has a search score that meets adistant document demotion threshold and in response adjusting the searchscore of the first local document to demote its ranking in the firstorder so that the rank of the first local document relative to the rankof the at least one document is decreased.
 17. The data store of claim15, where the operation of adjusting the search score of the first localdocument to demote its ranking in the first order so that the rank ofthe first local document relative to the rank of the at least onedocument is decreased comprises the operation of adjusting the searchscore of the first local document to demote its ranking in the firstorder so that the rank of the at least one document is greater than therank of the first local document.
 18. The data store of claim 15,wherein the data specifying a search query includes a local intentmeasure that is a measure of local intent for the search query, and theoperation of adjusting the search score of the first local document todemote its ranking in the first order so that the rank of the firstlocal document relative to the rank of the at least one document isdecreased comprises the operation of adjusting the search score of thefirst local document in inverse proportion to the local intent measureof the search query.
 19. The data store of claim 15, wherein theoperation of determining that a first local document in the propersubset of the local documents is eligible for a demotion operationfurther comprises the operation of determining that the first localdocument is eligible for demotion only if the first local document has alocation independent search score component that does not meet distantdocument preservation threshold.